package com.cskaoyan.mapper;

import com.cskaoyan.bean.CategoryList;
import com.cskaoyan.bean.CskaoyanmallCategory;
import com.cskaoyan.bean.CskaoyanmallCategoryExample;

import java.util.List;
import com.cskaoyan.bean.vo.CategoryL1Vo;
import com.cskaoyan.bean.vo.goods.CategoryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CskaoyanmallCategoryMapper {
    long countByExample(CskaoyanmallCategoryExample example);

    int deleteByExample(CskaoyanmallCategoryExample example);

    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(CskaoyanmallCategory record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(CskaoyanmallCategory record);

    List<CskaoyanmallCategory> selectByExample(CskaoyanmallCategoryExample example);

    List<CategoryVo> selectAll();

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    CskaoyanmallCategory selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CskaoyanmallCategory record, @Param("example") CskaoyanmallCategoryExample example);

    int updateByExample(@Param("record") CskaoyanmallCategory record, @Param("example") CskaoyanmallCategoryExample example);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(CskaoyanmallCategory record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(CskaoyanmallCategory record);
    
    List<CategoryList> selectCategoryList();

    List<CategoryL1Vo> selectCategoryListL1();

    List<CskaoyanmallCategory> selectByPid(Integer categoryId);

}